/* $RCSFile: ADNDynImportjob.cs $
 * Apache license v2 2011 by Christian Surieux
 * $Source: ?/CRMWrapper3/DynEntities/ADNDynImportjob.cs $
 * $log$
 * Revision 6 2010/08/06 19:56:32  christian.surieux
 *   Added Log to All cs files
 */

/* Copyrights Christian Surieux 2010 */
/* Class ADNDynImportjob */
/* Date 2010-01-06 16:07:27Z */

using System;
using System.Diagnostics;
using System.Collections;
using System.ComponentModel;
using System.Collections.Generic;
using System.Text;
using CrmSdk;

namespace AddonNice.CRMWrapper
{
    public class ADNDynImportjob : DynEntity
    {
        protected class Ftor: DFactor
        {
            public Ftor() : base(CrmStr.importjob)
            {}

            public override Type DynType
            { get { return typeof(ADNDynImportjob); } }

            public override string DynTypename
            {   get{ return CrmStr.importjob;}}

            public override DynEntity Build()
            {   return new ADNDynImportjob();}

            public override DynEntity Build(CRMWrapperBase w, InternalDynamicEntity dEntity, PropertyDescriptorCollection wproperties)
            {   return new ADNDynImportjob(w, dEntity, wproperties, null);}

            public override DynEntity Build(CRMWrapperBase w, string PrimaryFieldValue)
            {   return new ADNDynImportjob(w,PrimaryFieldValue);}

            public override DynEntity Build(CRMWrapperBase w,Guid PrimaryKeyValue)
            {   return new ADNDynImportjob(w,PrimaryKeyValue);}
        }

        static ADNDynImportjob(){new Ftor();} 
        
        public override bool HasOwnerProperty
        {
            get { return false; }
        }
        
        public override bool HasPrimaryField
        {
            get
            { return false; }
        }

        public ADNDynImportjob() : base() { }
        
        public ADNDynImportjob(CRMWrapperBase w,string PrimaryFieldValue)
            : base(w,CrmStr.importjob)
        { }
        
        public ADNDynImportjob(CRMWrapperBase w,Guid CrmId) : base(w,CrmStr.importjob,CrmId) { }
        
        public ADNDynImportjob(CRMWrapperBase w,InternalDynamicEntity e) : base(w,CrmStr.importjob,e,null,null) { }
        
        public ADNDynImportjob(CRMWrapperBase w,InternalDynamicEntity e,PropertyDescriptorCollection prop,InternalColumnSet s) : base(w,CrmStr.importjob,e,prop,s) { }
        
        public ADNDynImportjob(ResetWrapperHandler fn,string PrimaryFieldValue)
            : base(fn,CrmStr.importjob)
        { }
        
        public ADNDynImportjob(ResetWrapperHandler fn,Guid CrmId) : base(fn,CrmStr.importjob,CrmId) { }
        
        public ADNDynImportjob(ResetWrapperHandler fn,InternalDynamicEntity e) : base(fn,CrmStr.importjob,e,null,null) { }
        
        public ADNDynImportjob(ResetWrapperHandler fn,InternalDynamicEntity e,PropertyDescriptorCollection prop,InternalColumnSet s) : base(fn,CrmStr.importjob,e,prop,s) { }

        /* Properties */

        [CrmDynAttribute(CrmStr.importjob)]
        public Guid importjobid
        {
            get
            { return KeyPropertyValue(CrmStr.importjobid); }
            set
            { AddKeyProperty(CrmStr.importjobid,value); }
        }

        protected override void SetCrmIdProperty(Guid crmId)
        {
            if ( !dicProperty.ContainsKey(CrmStr.importjobid) || KeyPropertyValue(CrmStr.importjobid) != crmId )
                importjobid = crmId;
        }
        public override Guid PrimaryKeyGuidValue
        {
            get
            { return importjobid; }
            set { importjobid = value; }
        }
        [CrmDynAttribute(CrmStr.importjob)]
        public string completedon
        {
            get
            { return DateTimePropertyValue(CrmStr.completedon); }
            set
            { AddDateTimeProperty(CrmStr.completedon,value); }
        }

        [CrmDynAttribute(CrmStr.importjob)]
        public string data
        {
            get
            { return StringPropertyValue(CrmStr.data); }
            set
            { AddStringProperty(CrmStr.data,value); }
        }

        [CrmDynAttribute(CrmStr.importjob)]
        public override string name
        {
            get
            { return StringPropertyValue(CrmStr.name); }
            set
            { AddStringProperty(CrmStr.name,value); }
        }

        [CrmDynAttribute(CrmStr.importjob)]
        public string startedon
        {
            get
            { return DateTimePropertyValue(CrmStr.startedon); }
            set
            { AddDateTimeProperty(CrmStr.startedon,value); }
        }

        [CrmDynAttribute(CrmStr.importjob)]
        public int timezoneruleversionnumber
        {
            get
            { return NumberPropertyValue(CrmStr.timezoneruleversionnumber); }
            set
            { AddNumberProperty(CrmStr.timezoneruleversionnumber,value); }
        }
    }
}